#ifndef _ADO_EX_H_
#define _ADO_EX_H_

#import "msado15.dll"  no_namespace rename("EOF", "adoEOF")  rename("BOF", "adoBOF") 
#include "dll_ado.h"

class CAdoEx :public houbin::database::IAdo
{
public:
	CAdoEx(void);
	virtual ~CAdoEx(void);
public:
	virtual BOOL GetConnectState();
	virtual void Disconnnect();
	virtual BOOL ConnectionDB(__in LPCTSTR szConnString, __in LPCTSTR szUserName, __in LPCTSTR szPwd);
	virtual void MoveFirst();
	virtual void MoveLast();
	virtual void MoveNext();
	virtual _variant_t GetItem(__in LPCTSTR szTitle);
	virtual BOOL IsEOF();
	virtual BOOL ExecuteSQL(__in LPCTSTR szSQL);
private:
	_ConnectionPtr	m_pConnection;
	_CommandPtr		m_pCommand;
	_RecordsetPtr	m_pRecordset;
	BOOL			m_bIsOpen;
};

#endif
